<template>
  <div id="views" class="width100 textCenter" style="font-size: 0;">
    <img src="../../common/imgs/index_ba.png" class="width100" alt="内容">
    <p class="loginBg">
      <router-link to="/login" ></router-link>
    </p>
    <img src="../../common/imgs/index_bc.png" class="width100" alt="内容">
  </div>
</template>
<script>
  import { isLogin } from '../../http/api';
  export default {
    name: 'index',
    data(){
      return{ }
    },
    mounted() {
      let haveUid = this.$store.state.uid;
      if(!haveUid){
        this.$router.replace({path: '/entrance'});
        return;
      }
      let thiz = this;
      isLogin({noToast : true}).then( res => {
        if( res.code == 200){
          thiz.$router.push({path: '/entrance'});
        }
      })
    }
  }
</script>
<style type="text/less" lang="less" scoped>

  img{font-size: 0;}
.loginBg{
 background: url("../../common/imgs/index_loginbtn_bg.png") center center no-repeat;background-size: 100% 100%;
  >a{
    height: 0.8rem;width: 3.3rem;display: inline-block;font-size: 0;
   background: url("../../common/imgs/login_btn.png") center center no-repeat;background-size: 100% 100%;
  }
}
</style>
